# model

# static values for same attributes - add more if necessary
_REGIONNAME = ['Amazon S3/EC2', 'Google Storage', 'OpenStack Storage']
_ENDPOINTURL = ['s3.amazonaws.com', 'commondatastorage.googleapis.com']

# this port-numbers are only important for eucalyptus - because GAE only knows this ports. a redirect is necessary.
_PORT = ['80', '443', '4443', '8080', '8081', '8082', '8083', '8084', '8085', '8086', '8087', '8088', '8089', '8444', '8990']
_CREDENTIALTYPE = ['Amazon S3/EC2', 'Google Storage', 'OpenStack Storage']


# contains the attributes for OctousCloudDatabase
from google.appengine.ext import db
from google.appengine.api import users
from google.appengine.ext import webapp

class OctopusCloudDatabase(db.Model):
#    user = db.UserProperty(required = True)
    user = db.StringProperty(required = True)
    regionname = db.StringProperty(choices = _REGIONNAME)
    endpointURL = db.StringProperty()
    port = db.StringProperty()
    credentialType = db.StringProperty()
    accessKey = db.StringProperty(required = True)
    secretAccessKey = db.StringProperty(required = True)
    date = db.DateTimeProperty(auto_now_add = True)


